// generated 2005/9/8 12:03:41 CST by xihels@163.com
//


#ifndef _CYCLONE_DIALOG_HH_
#  define _CYCLONE_DIALOG_HH_

// Since all your widgets were private I made them all public.
// To differentiate between accessable (e.g. entries, output labels)
// and unaccessible widgets (e.g. static labels, containers)
// you should use the 'visibility' property (only visible in C++ mode)


#if !defined(GLADEMM_DATA)
#define GLADEMM_DATA 
#include <gtkmm/accelgroup.h>

class GlademmData
{  
        
        Glib::RefPtr<Gtk::AccelGroup> accgrp;
public:
        
        GlademmData(Glib::RefPtr<Gtk::AccelGroup> ag) : accgrp(ag)
        {  
        }
        
        Glib::RefPtr<Gtk::AccelGroup>  getAccelGroup()
        {  return accgrp;
        }
};
#endif //GLADEMM_DATA

#include <gtkmm/window.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/messagedialog.h>
#include <stdint.h>

class MainWindow;

class CycloneDialog : public Gtk::Window {  
    protected:
	GlademmData *gmm_data;
	class Gtk::HButtonBox * hbuttonbox;
    protected:

	CycloneDialog(
		MainWindow& _parent,
		uint32_t _id,
		const Glib::ustring& title, 
		const Glib::ustring& message,
		bool use_markup = false,
		bool modal = false,
		Gtk::MessageType type = Gtk::MESSAGE_INFO);

    public:
	~CycloneDialog();
	uint32_t getId() const { return id; }
    protected:
	MainWindow& parent;
	uint32_t id;
};

class PasswdErrorDialog : public CycloneDialog {
    public:
	PasswdErrorDialog(
		MainWindow& _parent,
		uint32_t _id,
		const Glib::ustring& message,
		bool use_markup = false,
		bool modal = false);
    private:
	bool on_delete_event(GdkEventAny*);
};

class DisconnectDialog : public CycloneDialog {
    public:
	DisconnectDialog(
		MainWindow& parent,
		uint32_t _id,
		const Glib::ustring& message,
		bool use_markup = false,
		bool modal = false);
    private:
	bool on_delete_event(GdkEventAny*);
	bool on_timeout();
    private:
	Gtk::Label* labelYes;
	int time_out;
};
#endif
